<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script src="parsing-test-utils.js"></script>
<script>
description('Testing parsing of the shape-outside property.');

// The test functions and globals used here are defined parsing-test-utils.js.

validShapeValues.forEach(function(elt, i, a) {
    var value = (elt instanceof Array) ? elt[0] : elt;
    var expectedValue = (elt instanceof Array) ? elt[1] : elt;
    var computedValue = (elt instanceof Array && elt.length > 2) ? elt[2] : expectedValue;
    testShapeSpecifiedProperty("shape-outside", value, expectedValue);
    testShapeComputedProperty("shape-outside", value, computedValue);
});

testLocalURLShapeProperty("shape-outside", "url('image')", 'url("image")');

invalidShapeValues.forEach(function(value, i, a) {
    testShapePropertyParsingFailure("shape-outside", value, "none")
});

applyToEachArglist(
    testNotInheritedShapeProperty,
    [// [property, parentValue, childValue, expectedValue]
     ["-webkit-shape-outside", "none", "circle(30px at 10px 20px)", "parent: none, child: circle(30px at 10px 20px)"],
     ["-webkit-shape-outside", "circle(30px at 10px 20px)", "initial", "parent: circle(30px at 10px 20px), child: none"],
     ["-webkit-shape-outside", "circle(30px at 10px 20px)", "", "parent: circle(30px at 10px 20px), child: none"],
     ["-webkit-shape-outside", "circle(30px at 10px 20px)", "inherit", "parent: circle(30px at 10px 20px), child: circle(30px at 10px 20px)"],
     ["shape-outside", "", "inherit", "parent: none, child: none"],
     ["shape-outside", "none", "inherit", "parent: none, child: none"]]
);
</script>
</body>
</html>
